<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<script type="text/javascript" charset="utf-8">
			mui.init();
		</script>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<h1 class="mui-title">导航列表</h1>
		</header>
		<div class="mui-content">
			<ul id="list" class="mui-table-view mui-table-view-chevron">
				<li class="mui-table-view-cell mui-collapse">
					<a class="mui-navigate-right" href="#">
						sortable.js
					</a>
					<ul class="mui-table-view mui-table-view-chevron">
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right" href="sortable/addteml.html">
								normal
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right" href="sortable/index.html">
								仿ios、 android应用排序--切换
							</a>
						</li>
						<li class="mui-table-view-cell">
							<a class="mui-navigate-right" href="sortable/sort3.html">
								仿ios、 android应用排序--长按
							</a>
						</li>
					</ul>
				</li>
			</ul>
		</div>
		<script type="text/javascript">
			mui.ready(function() {
				//主列表点击事件
				mui('#list').on('tap', 'a', function() {
					var id = this.getAttribute('href');
					var href = this.href;
					if (href.lastIndexOf("#") > 0) return;
					mui.openWindow({
						id: id,
						url: this.href,
					});
				});
			});
			 //首页返回键处理
			 //处理逻辑：1秒内，连续两次按返回键，则退出应用；
			var first = null;
			mui.back = function() {
				//首次按键，提示‘再按一次退出应用’
				if (!first) {
					first = new Date().getTime();
					mui.toast('再按一次退出应用');
					setTimeout(function() {
						first = null;
					}, 1000);
				} else {
					if (new Date().getTime() - first < 1000) {
						plus.runtime.quit();
					}
				}
			};
		</script>
	</body>

</html>